﻿<%@ Page Language="C#" MasterPageFile="~/Layouts/Form.Master" AutoEventWireup="true" CodeBehind="OrganizationEdit.aspx.cs" Inherits="Bingosoft.WebApp.Modules.SecurityConsole.Organization.OrganizationEdit" %>

<asp:Content ContentPlaceHolderID="head" ID="idFormTitle" runat="server">
    <title><%=Request["title"]%></title>
</asp:Content>
<asp:Content ContentPlaceHolderID="Content" ID="idFormMain" runat="server">
    <web:SmartFormView ID="SmartFormView1" runat="server" DataKeyNames="Id" DataSourceID="SmartDataSource1"
        Width="100%">        
        <InsertItemTemplate></InsertItemTemplate>
        <EditItemTemplate></EditItemTemplate>
        <ItemTemplate>
            <asp:TextBox ID='Parent' runat='server' Text='<%# Bind("Parent") %>' Width='60%'
                            Visible="false"></asp:TextBox>
            <asp:TextBox ID='Id' runat='server' Text='<%# Bind("Id") %>' Width='60%'
                            Visible="false"></asp:TextBox>
          <div>
            <table cellpadding='2' cellspacing='1' width='100%' class="formitem">
             <caption><%=Request["title"]%></caption>
                <tr>
                    <th>                        
                        上级组织:
                    </th>
                    <td>
                        <asp:Label ID="ParentName" runat="server" Text='<%# GetParentName(Eval("ParentName")) %>'  Width='60%'
                         ReadOnly="true"></asp:Label>                        
                    </td>
                </tr>
                <tr>
                    <th>
                        组织名称:<font color='red'>*<ont>
                    </th>
                    <td>
                        <asp:TextBox ID='Name' runat='server' Text='<%# Bind("Name") %>' Width='60%'
                            validator="required,length[1,150]"></asp:TextBox>
                    </td>
                </tr>                                  
            </table>
        </div>
        </ItemTemplate>
    </web:SmartFormView>
    
    <web:SmartSqlDataSource ID="SmartDataSource1" runat="server" SelectCommand="organization.select"
     SelectCommandAutoPageWrap="false">
    </web:SmartSqlDataSource>

    <!-- 页脚区域 -->
	<div class="footer">
		<asp:Button runat="server" Text="确定" 
            OnClientClick="return validateForm();" onclick="SaveOrganization"/>        
        <asp:Button ID="CloseButton2" runat="server" Text="关闭" OnClientClick="return closeForm();" />        
	</div>
</asp:Content>
